Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Update to the latest version of skn #1980

Merged
merged 10 commits into from
Aug 3, 2021
Merged

Update to the latest version of skn #1980

merged 10 commits into from
Aug 3, 2021

Conversation

BPScott
Copy link
Member

@BPScott BPScott commented Jul 30, 2021

Description

sewing-kit-next has undergone some juicy changes. Simplifying and reworking its architecture and plugins. Here's a PR to pull our skn dependencies up to the latest versions. The build output of all packages remains identical to main, with the exception of some extra ts-expect-error comments added because TS is confusing itself as I haven't updated the contents of sewing-kit-plugin-quilt- to use the latest versions of the sk packages.

Stuff of note:

  • the @sewing-kit/{config,hooks,plugins} packages have all be consolidated into the core package.
  • plugin-javascript and its built-in babel config is gone, replaced by plugin-babel, which requires you explicitly state the babel preset that you wan to use. Unsuprisingly we've chosen @shopify/babel-preset as the baseline babel config.
  • We no longer generate d.ts file entrypoints. This means that the types and typesVersions keys in package.json now point into the build folder directly

Testing

To compare the old and new build output i did the following:

  • Checked out the main branch into ~/projects/quilt, Ran rm -rf .sewing-kit; git clean -f -x packages/*/build; yarn build to generate a fresh build of main.
  • Checkout out this branch into another folder an ran rm -rf .sewing-kit; git clean -f -x packages/*/build; yarn build to generate a fresh build of this branch
  • Ran for PACKAGENAME in $(ls -1 packages) do; diff -ru packages/$PACKAGENAME/build ~/projects/quilt/packages/$PACKAGENAME/build -x '*.tsbuildinfo' to run diffs of every packages's build output.
  • Noted that the only differences were as a result of code changes in sewing-kit-plugin-quilt, and d.ts files no longer being generated at the root (as we now point types/typesVersions directly into the build folder)

Type of change

  • all: patch

@BPScott BPScott requested a review from a team July 30, 2021 01:45
export function quiltPackage({
jestEnv = 'jsdom',
useReact = false,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed useReact as there is no harm in enabling it for all packages

jestTestRunner = 'jest-circus',
polyfill = true,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only package that overrides this and sets it to false is polyfills because we want that package to uh, provide the polyfills.

packageBuild({
nodeTargets: 'node 12.14.0',
browserTargets: 'extends @shopify/browserslist-config',
}),
createProjectBuildPlugin('Quilt.PackageBuild', ({hooks}) => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

babelIgnorePatterns no longer exists, and we don't need to add legacy decorator support because @shopify/babel-preset already enables it correctly

Copy link
Contributor

@dahukish dahukish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a pair review with @BPScott LGTM

@BPScott BPScott merged commit 460a795 into main Aug 3, 2021
@BPScott BPScott deleted the skn-updates branch August 3, 2021 22:17
@BPScott BPScott mentioned this pull request Aug 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants